#ifndef _AS_STEER_COMPONENT_H_
#define _AS_STEER_COMPONENT_H_

#include "ASMobileComponent.h"
#include "ASSteeringBehaviors.h"

NS_AS_BEGIN


class ASSteerComponent:public ASMobileComponent
{
	ASComponentNameDeclare(ASSteerComponent);
public:
	ASSteerComponent(double headchangespeed);
	virtual ~ASSteerComponent();

	virtual void update(float dt) override;
	//virtual void updateBefore() override;
	//virtual void updateAfter() override;
	//virtual void onEnter() override;
	//virtual void onExit() override;
	
	ASSteeringBehavior* getSteeringBehavior(){return _pSteer;}
protected:
	ASSteeringBehavior* _pSteer;
	
	double _dHeadChgSpeedSQ;//when _vVelocity.LengthSQ() > this param,will  change _vHeading and _vSide 

private:
	int _iTurnFlag;
};

NS_AS_END

#endif